<h1>Proizvodi</h1>
<div class="elementFilter">
    <form action="<?php echo url_for('proizvod/index')?>" method="post">
<?php echo $filter?>
        <input type="submit" value="Pošalji">
</form>
					</div>

<table id="rounded-corner">
  <thead>
    <tr>
      <th scope="col" class="rounded-company" >Slika</th>
      <th> Naziv</th>
     
      <th> Cena</th>   
  
      <th> Kol</th>
      <th> Kategorija</th>
      <th> Izmena</th>
      <th> Brisanje</th>
      <th scope="col" class="rounded-qend">Konkurencija</th>
      
    </tr>
  </thead>
  <tfoot>
    	<tr>
        	<td colspan="" class="rounded-foot-left">&nbsp;</td>
                <td colspan="6" ><em><?php if ($pager->haveToPaginate()): ?>
  <?php echo link_to('&laquo;', 'proizvod/index?page='.$pager->getFirstPage()) ?>
  <?php echo link_to('&lt;', 'proizvod/index?page='.$pager->getPreviousPage()) ?>
  <?php $links = $pager->getLinks(); foreach ($links as $page): ?>
    <?php echo ($page == $pager->getPage()) ? $page : link_to($page, 'proizvod/index?page='.$page) ?>
    <?php if ($page != $pager->getCurrentMaxLink()): ?> - <?php endif ?>
  <?php endforeach ?>
  <?php echo link_to('&gt;', 'proizvod/index?page='.$pager->getNextPage()) ?>
  <?php echo link_to('&raquo;', 'proizvod/index?page='.$pager->getLastPage()) ?>
<?php endif ?>
</em></td>
                    
        	<td class="rounded-foot-right">  <a href="<?php echo url_for('proizvod/new') ?>">Dodavanje</a></td>
        </tr>
    </tfoot>


  <tbody>
    <?php foreach ($proizvod_list as $proizvod): ?>
    <tr>
        <td>

        <?php if (file_exists(sfConfig::get('sf_web_dir') . '/uploads/images/proizvod/proizvod_' . $proizvod->getId() . '.jpg')){ ?>
	<?php echo image_tag('/uploads/images/proizvod/proizvod_' . $proizvod->getId() . '.jpg', 'border="0" alt="" style="max-width: 150px; max-height=150px; border: 1px solid #999;"'); ?>
        <?php }else{ ?>
	&nbsp;
        <?php } ?>

        </td>
      <td><?php echo $proizvod->getNaziv() ?></td>
      <td><?php echo $proizvod->getNabavnaCena() ?></td>
      <td><?php echo $proizvod->getDostupnaKolicina() ?></td>
      <td><?php echo $proizvod->getKategorija()->getNaziv() ?></td>
      <td><?php echo button_to('Izmena', 'proizvod/edit?id='.$proizvod->getId())?></td>
      <td><?php echo button_to('Brisanje', 'proizvod/delete?id='.$proizvod->getId(), array('confirm'=>'Da li ste sigurni?'))?></td>
      <td><?php echo button_to('Konkurencija', 'konkurencija/index?proizvod_id='.$proizvod->getId())?></td>
    </tr>
    <?php endforeach; ?>
  </tbody>
</table>


  
